package com.yjt.gcss.gddw.modules.infoSxxy;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.yjt.common.base.datasource.DBContextHolder;
import com.yjt.common.easyui.datagrid.DataGridDTO;
import com.yjt.common.easyui.datagrid.DataGridJsonDTO;
import com.yjt.gcss.gddw.common.bean.domain.InfoSxxy;

@Controller
@RequestMapping("/gcss/gddw/InfoSxxyController")
public class InfoSxxyController {

	@Resource(name = InfoSxxyService.BEAN_PACKAGE_NAME)
	private InfoSxxyService infoSxxyService;
	
	@RequestMapping("/index")
	public String index() {
		return "/WEB-INF/admin/gcss/gddw/infoSxxy/index";
	}
	
	@RequestMapping("/query")
	@ResponseBody
	public DataGridJsonDTO query(InfoSxxy queryModel, HttpServletRequest request) {
		DBContextHolder.setDBType(DBContextHolder.GDDW_SESSION_FACTORY);
		return infoSxxyService.query(new DataGridDTO(request), queryModel);
	}
}
